package gorails.com;


import java.util.TreeMap;

public class TripOption {
	private static TripOption instance = null;
	private TreeMap<String,String> stops = null;
	private String title = null;
	private String express =  null;
	private String departure = null;
	private String arrival = null;
	private String hasATM = null;
	private boolean bringTicket = false;
	private double ticketPrice = 0.0;
	private String departStation = null;
	private String arrivalStation = null;
	protected TripOption(){
		title = "";
		express = "";
		departure = "";
		arrival = "";
		hasATM = "";
		departStation = "";
		arrivalStation = "";
		ticketPrice = 0.0;
	}
	public static TripOption getInstance(){
		if(instance==null){
			instance = new TripOption();
		}
		return instance;
	}
	public static void reset(){
		instance=null;
		System.gc();
	}
	public void setDepartStation(String ds){
		departStation = ds;
	}
	public String getDepartStation(){
		return departStation;
	}
	public void setArrivalStation(String as){
		arrivalStation = as;
	}
	public String getArrivalStation(){
		return arrivalStation;
	}
	public void setStops(TreeMap<String,String> s){
		stops = s;
	}
	public TreeMap<String,String> getStops(){
		return stops;
	}
	public void setTitle(String t){
		title = t;
	}
	public String getTitle(){
		return title;
	}
	public void setExpress(String e){
		express = e;
	}
	public String getExpress(){
		return express;
	}
	public void setDeparture(String d){
		departure = d;
	}
	public String getDeparture(){
		return departure;
	}
	public void setArrival(String a){
		arrival = a;
	}
	public String getArrival(){
		return arrival;
	}
	public void setATM(String atm){
		hasATM = atm;
	}
	public String getATM(){
		return hasATM;
	}
	public void setBringTicket(boolean t){
		bringTicket = t;
	}
	public boolean getBringTicket(){
		return bringTicket;
	}
	public void setTicketPrice(double cost){
		ticketPrice = cost;
	}
	public double setTicketPrice(){
		return ticketPrice;
	}
}
